Project

What Makes Us Happy? A Dive into the World Happiness Report 2024

Hello readers! It’s finally a new year! We’ve counted down, cheered, and wished each other a heartfelt “Happy New Year!”. Because, let’s face it, deep down, we all want each other to be happy, right? Well, guess what? The World Happiness Report 2024 is here to tell us exactly what that means.

Happiness, it’s that thing we’re all chasing. Whether it’s through watching endless cat videos, making it onto the bus just in time despite being late, or managing to avoid spilling coffee all over yourself before a big meeting. But have you ever stopped to wonder, “What actually makes us happy?”, Is it money?, Friends?, Freedom? (Or is it just making it through mondays without a meltdown?). Well, guess what?, The World Happiness Report 2024 is here to tell us exactly what that means!

The World Happiness Report 2024 has some answers, or at least a few clues. And let me tell you, this isn’t just another clickbait list like “Top 10 Happiest Countries That’ll Make You Jealous.” Oh no, this is some serious, serious business, brought to you by the brainiest folks from Gallup, the Oxford Wellbeing Research Centre, the UN Sustainable Development Solutions Network, and the WHR Editorial Board. (Try saying all that in one breath.)

Their mission? To convince governments and societies that happiness isn’t just some fluffy, optional feeling. It’s actually a pretty solid way to measure progress. You might then wonder “How do they do it?”. They do it by asking alot of people a deceptively simple question:

“Imagine your life as a ladder. The best possible life is a 10, and the worst is a 0. Where are you standing right now?”

No but really the The Cantril Ladder asks respondents to think of a ladder, with the best possible life for them being a 10 and the worst possible life being a 0. They are then asked to rate their own current lives on that 0 to 10 scale. It actually turns out that the answers to that question can tell us a lot. Using these responses, they identified six magical ingredients to happiness. And they are the following:

  1. GDP per capita (because let’s be honest, life’s a little easier with a solid paycheck).
  2. Social support (aka having someone who’ll show up when your car breaks down).
  3. Healthy life expectancy (you can’t enjoy life if you’re coughing through it).
  4. Freedom to make life choices (we all want to be our own boss, maybe just not literally).
  5. Generosity (kindness counts, even if it’s just sharing your fries).
  6. Perceptions of corruption (no one’s smiling if the system feels rigged).

But hear me out here’s the twist: the rankings aren’t just cold, hard math (as it may seem). They’re based on how people feel. Which means that even countries with similar circumstances might see the world and their happiness through entirely different lenses.

Let’s Get Visual

(Don’t worry readers whether you know coding or not. We will take this slow and just look at some plots made from this data and see what we find interesting along the way.)

To begin our analysis, we first gathered the necessary data from the official World Happiness Report website. The report provides valuable insights into the factors that contribute to the happiness of people in various countries. For this analysis, we utilized the Excel file from the official source: World Happiness Report 2024.

#Loaded necessary libraries
library(readxl)
## Warning: package 'readxl' was built under R version 4.4.2
library(kableExtra)
## Warning: package 'kableExtra' was built under R version 4.4.2
library(knitr)
## Warning: package 'knitr' was built under R version 4.4.2
library(DT)
## Warning: package 'DT' was built under R version 4.4.2
library(tidyr)
## Warning: package 'tidyr' was built under R version 4.4.2
library(plotly)
## Warning: package 'plotly' was built under R version 4.4.2
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.4.2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.4.2
## 
## Attaching package: 'dplyr'
## The following object is masked from 'package:kableExtra':
## 
##     group_rows
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)

#Downloading and cleaning of the data
url <- "https://happiness-report.s3.amazonaws.com/2024/DataForFigure2.1+with+sub+bars+2024.xls"
download.file(url, destfile = "DataForFigure2.1_with_sub_bars_2024.xls", mode = "wb")

happy_data <- read_excel("DataForFigure2.1_with_sub_bars_2024.xls") %>%
  select(`Country name`, `Ladder score`, `Explained by: Log GDP per capita`, 
         `Explained by: Social support`, `Explained by: Healthy life expectancy`, 
         `Explained by: Freedom to make life choices`, `Explained by: Generosity`, 
         `Explained by: Perceptions of corruption`) %>%
  filter(!is.na(`Ladder score`))

To dive deeper, we have whipped up some fancy (but still fun) data visualizations. First, we made an interactive table where you can scroll through each country’s Ladder Score. (Spoiler alert!!!!!: Finland is #1, while Afghanistan holds the last spot). If you’ve ever wondered how these rankings stack up, this table makes it clear.

library(htmlwidgets)
## Warning: package 'htmlwidgets' was built under R version 4.4.2
#Interactive table with each countries "Ladder scores"
interactive_table <- datatable(
  happy_data %>% select(`Country name`, `Ladder score`), 
  options = list(pageLength = 10, autoWidth = TRUE),
  caption = "Countries and their Ladder Score"
)

interactive_table

Let’s just get it out of the way, Finland is the happiest country in the world. Again. Yes, the land of Moomins and saunas is living its best life at the top of the ladder. But who is right behind them? Give us some drumrolls…..It’s Denmark then Iceland, and then finally (as we all have waited for rigth?) Sweden, sitting pretty in fourth place. (Go us! Though seriously, are we that happy, or are we just grateful for fika breaks?)

But wait, what’s this? Israel is right behind us. Israel? With the ongoing conflict with Palestine? It makes you stop and think: “what’s pushing their score so high?”. Is it the GDP per capita? The social support? A secret stash of serotonin we don’t know about?

Well let’s dig even deeper into our analysis by examining the contributing factors for each country. We’ll plot how each factor (e.g., GDP, social support) contributes to the overall happiness score for each country. And again this is interactive so that you readers can choose to look at the country you find interesting. Fun right, how much you can do with just a simple excel file with some R coding. But enough about that and let us analys what this tells us!

happy_data_long <- happy_data %>%
  select(`Country name`, `Ladder score`, 
         `Explained by: Log GDP per capita`, 
         `Explained by: Social support`, 
         `Explained by: Healthy life expectancy`, 
         `Explained by: Freedom to make life choices`, 
         `Explained by: Generosity`, 
         `Explained by: Perceptions of corruption`) %>%
  pivot_longer(
    cols = starts_with("Explained by:"),
    names_to = "Factor",
    values_to = "Contribution"
  ) %>%
  mutate(Factor = gsub("Explained by: ", "", Factor)) %>% 
  filter(!is.na(Contribution))  
#Take away NA values

#Basdiagram
plot <- happy_data_long %>%
  plot_ly(
    type = "bar"
  )

#Adding every country as a button in the dropdown menu
dropdown_buttons <- lapply(unique(happy_data_long$`Country name`), function(country) {
  list(
    method = "restyle",
    args = list(
      list(
        x = list(happy_data_long$Factor[happy_data_long$`Country name` == country]),
        y = list(happy_data_long$Contribution[happy_data_long$`Country name` == country]),
        text = list(happy_data_long$`Country name`[happy_data_long$`Country name` == country]),
        type = "bar"
      )
    ),
    label = country
  )
})

#Add a button to show all the countries 
dropdown_buttons <- c(
  list(
    list(
      method = "restyle",
      args = list(
        list(
          x = list(happy_data_long$Factor),
          y = list(happy_data_long$Contribution),
          text = list(happy_data_long$`Country name`),
          type = "bar"
        )
      ),
      label = "All Countries"
    )
  ),
  dropdown_buttons
)

#Adding a dropdown-menu in the layout
plot <- plot %>%
  layout(
    title = "Contribution of Factors to Ladder Score",
    xaxis = list(title = "Factors"),
    yaxis = list(title = "Contribution to Ladder Score"),
    updatemenus = list(
      list(
        type = "dropdown",
        buttons = dropdown_buttons
      )
    )
  )

plot

Are we really surprised?, GDP per capita seems to be the biggest contributing factor to every countries ladder score. After that comes the score for social support. If you scroll through these countries and look at the factors you can see that many countries haven’t given themlselves a high score for perception of corruption or freedom to make life choices. It seems like we all feel bad about being controlled and not having our voices heard. Maybe that is why the score of generosity is as low as it is.”Treat others the way they treat you!“(But if they’re a raccoon with a garbage can, then remember not to take your frustration out on the innocent squirrels around you!)

Let’s focus again. To make it easier to compare the contributing factors to the ladder score we now provide a comparison of the top three countries of the ladder score and the bottom three. These countries are as we have already have seen before, if you remember: (we can take it easy we don’t need the drumrolls again) Finland, Denmark and Iceland for the top three and Lesotho (never heard of that before), Lebanon and Afghanistan at the bottom. To make it really easy we have a plot that shows each of these countries scores of the factors beside eachother. (We don’t have time for more)

#Comparison of top 3 and bottom 3 countries
top_3 <- happy_data %>%
  arrange(desc(`Ladder score`)) %>%
  head(3)

bottom_3 <- happy_data %>%
  arrange(`Ladder score`) %>%
  head(3)

compare_data <- bind_rows(top_3, bottom_3) %>%
  pivot_longer(cols = starts_with("Explained by"), names_to = "Factor", values_to = "Value")

ggplot(compare_data, aes(x = `Country name`, y = Value, fill = Factor)) +
  geom_bar(stat = "identity", position = "dodge") +
  facet_wrap(~Factor, scales = "free_y") +
  labs(title = "Comparison of Top 3 and Bottom 3 Countries by Key Factors", 
       y = "Value", x = "Country") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Well is there anything that surprises you? The top three countries seems to have high scores on everything right? The one thing that seems to stick out for them is how Finland aren’t as generous as Denmark and Iceland (Winners are never generous right!). But they still have higher scores than the bottom three countries. But as we can see the bottom three countries all have low scores for perceptions of corruption and freedom to make life choices (well Lesotho seems to have given them a quite good score for that though, but they have no score for healthy life expectancy), maybe these could explain why they can’t be generous. It feels like alot of these score are linked together.

Even though we may have gathered some more understanding of the data from this analysis we all want to understand how the whole world takes a part into this right. So to get a even better understanding of this world happiness report we have created a world map that shows us the score for each country by using a happiness score bar that shows what the colors in the map represents.

#World map visualization
map_plot <- plot_ly(
  data = happy_data,
  type = 'choropleth',
  locations = ~`Country name`,
  locationmode = 'country names',
  z = ~`Ladder score`,
  colorscale = 'Viridis',
  reversescale = FALSE,
  text = ~paste("Country: ", `Country name`, "<br>Happiness Score: ", `Ladder score`),
  colorbar = list(title = "Happiness Score")
) %>%
  layout(
    title = "World Happiness Map by Ladder Score",
    geo = list(
      showframe = FALSE,
      showcoastlines = TRUE,
      projection = list(type = 'natural earth')
    )
  )


map_plot

From this map, it’s clear that Europe is full of people strolling around with smiles, sipping coffee at cozy cafes, and maybe even petting their wellfed dogs. And let’s not forget about Australia, where kangaroos bounce around happily, koalas lounge on eucalyptus trees, and people can bask in endless sunshine. North America, of course, has its fair share of cheerful folks too, thanks to pizza, burgers, and thir deep rooted belief that every meal should involve cheese in some form. It’s a happiness buffet, and everyone’s invited.

But then, as we move our gaze eastward, things start to feel a little less vibrant. In Asia, there’s this underlying sense that something’s missing. Maybe it’s the endless pressure of expectations, the rapid pace of life, or the fact that you can’t always see the mountains because of the smog. People in South America, too, are often caught in a tug-of-war between joy and struggle. Maybe it’s the political unrest, the economic challenges, or the social disparities that leave people feeling like they’re running on empty, despite the warm spirit and music that fill the streets.

And then, there’s Africa. A place where it’s hard to imagine the constant joy we associate with happiness. With so many living in poverty, facing political instability, and struggling for basic necessities like clean water and healthcare, the idea of happiness sometimes feels like a distant dream. It’s not surprising, when your daily concern is whether you’ll have enough food or clean water, the last thing on your mind is whether you’re “happy.” It’s a stark reminder of how much we often take for granted.

Conclusion

This analysis shows that while happiness is influenced by a variety of factors, GDP per capita and social support stand out as significant contributors to higher happiness scores. Financial stability provides individuals with the resources they need for security and opportunities, while social support creates a foundation of connection and care, both of which are essential for wellbeing. While money alone may not buy happiness, it undeniably plays a vital role in creating the conditions for happiness to thrive.

The World Happiness Report reminds us that the path to a happier world isn’t just about increasing wealth. It’s about investing in stronger social networks, accessible healthcare, and ensuring that people have the opportunity to lead meaningful, fulfilling lives. By focusing on these areas, we can move closer to a world where happiness isn’t a luxury for the few, but a reality for everyone.

Let’s acknowledge these factors and work towards a happier world for everyone. And as an end to this blog I just want to say I truly hope that this year will bring you happiness!!